//-----------------------------------------------------------------------
// <copyright file="a_RelProductService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_RelProductService
    {
        #region a_RelProduct

        public static void Createa_RelProduct(a_RelProduct a_RelProduct)
        {            
            try
            {
                a_RelProductDAO a_RelProductDAO = new a_RelProductDAO();
                a_RelProductDAO.Createa_RelProduct(a_RelProduct);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }        

        public static void Updatea_RelProduct(a_RelProduct a_RelProduct)
        {            
            try
            {
                a_RelProductDAO a_RelProductDAO = new a_RelProductDAO();
                a_RelProductDAO.Updatea_RelProduct(a_RelProduct);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_RelProduct(int rpid)
        {            
            try
            {
                a_RelProductDAO a_RelProductDAO = new a_RelProductDAO();
                a_RelProductDAO.Deletea_RelProduct(rpid);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_RelProduct Geta_RelProduct(int rpid)
        {            
            try
            {
                a_RelProductDAO a_RelProductDAO = new a_RelProductDAO();
                return a_RelProductDAO.Geta_RelProduct(rpid);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }                

        public static a_RelProductCollection Geta_RelProductList(a_RelProductColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_RelProductDAO a_RelProductDAO = new a_RelProductDAO();
                return a_RelProductDAO.Geta_RelProductList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_RelProductCollection Geta_RelProductList(a_RelProductColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_RelProductDAO a_RelProductDAO = new a_RelProductDAO();
                return a_RelProductDAO.Geta_RelProductList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion
    }
}